<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataBoundUsercontrolExample.aspx.cs" Inherits="Demo.DataBoundUsercontrolExample" %>
<%@ Register src="UserControls/ProfileControl.ascx" tagname="ProfileControl" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>DataBound UserControl Example</title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
    <link href="css/style.css" type="text/css" rel="stylesheet" />
    <script src="script/prototype.js?load=effects,slider" type="text/javascript"></script>
    <script src="script/scriptaculous.js?load=effects,slider" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="float:left">
        <h2 style="font-family:Courier New;margin-left:50px">DataBound UserControl Example</h2>
        <ul style="font-family:Courier New;font-size:20px">
         <li><a style="text-decoration:none" href="Index.aspx">Index</a></li>
         <li>DataBound UserControls</li>
         <li><a style="text-decoration:none" href="TemplatedDataBoundUserControlExample.aspx">Templated DataBound UserControls</a></li>
         <li><a style="text-decoration:none" href="JsApiIntroduction.aspx">Introducing the JsApi</a></li>
         <li><a style="text-decoration:none" href="AdvancedJsApi.aspx">Advanced JsApi</a></li>
        </ul>
        <uc1:ProfileControl ID="ProfileControl1" runat="server" />
    </div>
    <div style="float:right;background-color:white;background-image:none;border:1px solid menu;font-family:Courier New;font-size:18px;padding:15px">
        UserControls were a great idea. However, due to their lack of support for Templating 
        and DataBinding, their promise of reusability, in my opinion, was never quite 
        realized. In this example we correct one of these shortcomings and extend the 
        UserControl to support DataBinding by inheriting from <strong>DataBoundUserControl</strong>. Here we 
        have defined a user control and in the containing page we have bound it to a 
        NameValueCollection.
        <br />
        <br />
        This is great! But admittedly somewhat limited. We still don't have the concept 
        of an enumeration, we have essentially bound a control to what we can 
        characterize as a single record. So how do we go about creating a Templated DataBound 
        UserContorl that, let's say, lists multiple profiles without resorting to using a 
        Repeater or some other Server Control. That's where the <strong>TemplatedDataBoundUserControl</strong> comes in.
        <br />
        <br />
    
    </div>
    </form>
</body>
</html>
